package com.foreknow.oop2;

public class User {
  private String name; //属性在创建对象的时候会自动进行初始化，不用赋值
  private int age;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public int getAge() {
    return age;
  }

  public void setAge(int age) {
    this.age = age;
  }

  public static void main(String[] args) {
    User user = new User();
    System.out.println(user.getName());
    int i = 0;//局部变量一定要先初始化然后才能使用
    System.out.println(i);
  }
}
